﻿using System;
using System.Collections.Generic;
using Core;
using Unity.VisualScripting;
using UnityEngine;

namespace Game {
    public class PlayerComponent : Collider {
        public Action OnPlayerStart;
        public Action OnPlayerUpdate;
        public Action OnPlayerDestroy;

        public Transform Arm;
        public Transform Hand;
        public Transform WeaponBag;
        
        protected override void Awake() {
            base.Awake();
            //组件加载

            reset();
        }

        protected override void Start() {
            base.Start();
            OnPlayerStart?.Invoke();
        }

        protected override void Update() {
            base.Update();
            OnPlayerUpdate?.Invoke();
        }

        private void OnDestroy() {
            OnPlayerDestroy?.Invoke();
        }

        private void reset() {
            transform.position = Vector2.zero;
        }
    }
}